<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        html, body {
            width: 100%;
            height: 100%;
        }

        body {
            display: grid;
            place-items: center center;
        }

        .center-box {
            position: relative;
            width: 660px;
            height: 400px;
            border: solid #ddd;
            border-width: 0 0 2px 2px;
        }

        ul {
            position: relative;
            width: 100%;
            height: 100%;
        }

        li {
            position: absolute;
            width: 60px;
            height: 100%;
            background: #9bbef8;
            transition: .3s linear;
        }

        li:nth-child(1) {
            left: 60px
        }

        li:nth-child(2) {
            left: 180px
        }

        li:nth-child(3) {
            left: 300px
        }

        li:nth-child(4) {
            left: 420px
        }

        li:nth-child(5) {
            left: 540px
        }
    </style>
</head>
<body>

<div class="center-box">
    <ul>
        <li></li>
        <!--<li></li>
        <li></li>
        <li></li>
        <li></li>-->
    </ul>
</div>

<script>
    const nodeList = document.querySelectorAll('ul li');
    const list = [].slice.call(nodeList);
    list[0].addEventListener('click', function (e) {
        e.target.style.left = 200 + 'px'
    });

</script>
</body>
</html>
